<?php

define("CLASS_ROOT", dirname(__FILE__) . "/classes/");
set_include_path(CLASS_ROOT . PATH_SEPARATOR . get_include_path());

function _debug($what) {

	echo "<pre>";
	print_r($what);
	echo "</pre>";
	die();

}

function __autoload($sClassName) {

	$sFileName = CLASS_ROOT . str_replace("_", "/", $sClassName) . ".php";

	if(!file_exists($sFileName)) {
		throw new Exception("Class not found: " . $sClassName . " (" . $sFileName . ")");
	}

	require_once($sFileName);

}

?>